package com.asset.crm.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="deleted_contact")
public class DeletedContact implements Serializable{
	
	private Integer id;
	private Employee deleter;
	private Contact deleted;
	private Date date;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="deleted_contact_id_seq")
	@SequenceGenerator(name="deleted_contact_id_seq",sequenceName="deleted_contact_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the deleter
	 */
	@ManyToOne
	@JoinColumn(name="deleter_id")
	public Employee getDeleter() {
		return deleter;
	}
	/**
	 * @param deleter the deleter to set
	 */
	public void setDeleter(Employee deleter) {
		this.deleter = deleter;
	}
	/**
	 * @return the deleted
	 */
	@OneToOne
	@JoinColumn(name="deleted_id")
	public Contact getDeleted() {
		return deleted;
	}
	/**
	 * @param deleted the deleted to set
	 */
	public void setDeleted(Contact deleted) {
		this.deleted = deleted;
	}
	/**
	 * @return the date
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="date")
	public Date getDate() {
		return date;
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	
	

}
